/*
*
==============================================================================
*  Name        : 
*  Part of     : Omen Game Engine
*  Description : 
*  Version     : 1.0
*
*  Copyright (c) 2013 Lauri Kortevaara.
* 
==============================================================================
*/

#pragma once

#include "OmenConfig.h"
#include "OmenMath.h"

namespace Omen
{
    /// <summary>Axis Aligned Bounding Box class</summary>
    class OMEN_API AABB
    {
        public:
            AABB() : m_minimum(0.0,0.0,0.0), m_maximum(0.0,0.0,0.0) {}
            AABB( const Omen::Vector3d& min, const Omen::Vector3d& max );
            AABB( const AABB& other );
            virtual ~AABB();

            const Omen::Vector3d& minimum() const;  /// <summary>Retruns the minimum coordinate of AABB in 3d-space </summary>
            const Omen::Vector3d& maximum() const;  /// <summary>Retruns the maximum coordinate of AABB in 3d-space </summary>

            void setMinimum(const Omen::Vector3d& vminimum);  /// <summary>Sets the minimum coordinate of AABB in 3d-space </summary>
            void setMaximum(const Omen::Vector3d& vmaximum);  /// <summary>Sets the maximum coordinate of AABB in 3d-space </summary>

            Omen::Float width() const;                        /// <summary>Returns the width of the bounding box</summary>
            Omen::Float height() const;                       /// <summary>Returns the height of the bounding box</summary>
            Omen::Float depth() const;                        /// <summary>Returns the depth of the bounding box</summary>

            Omen::AABB operator+( const Omen::AABB& other );   /// <summary>Returns a union of this and given AABBs</summary>
            
        protected:
        private:
            mutable Omen::Vector3d  m_minimum;
            mutable Omen::Vector3d  m_maximum;
    };
}